package com.gz.furnitures.service;

import com.gz.furnitures.entity.Cart;
import com.gz.furnitures.entity.Order;
import com.gz.furnitures.entity.OrderItem;
import com.gz.furnitures.entity.Page;

import java.math.BigDecimal;
import java.util.List;

public interface OrderService {

    //订单时根据cart来生成的(这里不容易分析出来),cart在session中
    //订单是和会员关联的
    public String saveOrder(Cart cart,int memberId);

    public List<Order> queryOrder();

    public List<Order> getOrdersByMemberId(int begin, int pageSize, int memberId);

    public List<OrderItem> getPageOrderItemsByOrderId(int begin, int pageSize, String orderId);

    public Page<Order> orderPage(int begin, int pageSize, int memberId);

    public Page<OrderItem> orderItemPage(int begin, int pageSize, String orderId);

    public BigDecimal getOrderItemTotalPrice(String orderId);
    public Integer getOrderItemTotalCount(String orderId);

    public List<OrderItem> getOrderItemsByOrderId(String orderId) ;
}
